<?php
/**
 * Created by PhpStorm.
 * User: Guangpeng Chen
 * Date: 15-7-27
 * Time: 下午3:27
 */
defined('IN_PFT') or die('Access Denied!');
use \PFT\Db;
use \PFT\Resource;
include_once '/var/www/html/new/d/common/func.inc.php';
include_once '/var/www/html/new/d/module/common/Db.class.php';
$dbConf = include '/var/www/html/new/d/module/common/db.conf.php';// 远端服务器配置信息
Db::Conf($dbConf['localhost']);

include 'Resource.class.php';
$obj = new Resource(Db::Connect());
$resource_id = intval($_GET['resource_id']);

//显示待更新的数据
try {
    $data = $obj->GetResourceInfo($resource_id);
    extract($data);
    include ROOT_PATH. 'tpl/pft_resource/add.html';
} catch (ErrorException $e) {
    echo $e->getMessage();
}
Db::Close();
